Purpose
The getTime task allows you to obtain a current timestamp for use in other tasks in a workflow. An offset may be applied to the current timestamp, if needed. The getTime task uses UTC for time representation.
Potential Use Case
Use this task if you need to post the current time in a logfile or external database when an automation is started or completed. Using an offsetDuration, you can also use this task to provide a future timestamp that can be calculated from the current timestamp.
Properties
| Incoming | Type | Description | 
|---|---|---|
| Timezone | Enum | Required. The Timezoneto use for getting the current time. | 
| offsetDuration | Object | Optional. A duration to offset the current time expressed as an object literal notation. For example: {"days": 7,"months":1}will add 7 days and 1 month to the current system timestamp. Numeric values entered without any other designators will be treated as milliseconds (default). | 
| format | String | Optional. Represents the format in which the converted timestamp should be displayed. Accepts formats identified in the moment.js documentation. Leaving this parameter blank will default the outgoing timeparameter to the format ofYYYY-MM-DDTHH:mm:ss.SSSSSSZZ. | 
Note: If using object literal notations in the
offsetDurationproperty, you must include the curly braces in the value. See examples below. For more information regarding the object literal notation, see the moment.js documentation.
| Outgoing | Type | Description | 
|---|---|---|
| time | Object | The new timestamp that is returned by the task. Presented in the format specified by the incoming formatparameter. | 
Examples
Example 1
In this IAP example:
- The - Timezonevariable is set to UTC- -04:00(North American Eastern Time).
- The - offsetDurationwill add 7 days and 1 month to the- Timezonevalue that is retrieved.
- The - formatvariable is set to- LLLL, which is the format for Month name, day of month, day of week, year, time.
- For this example, the new - timevalue produced upon output will be presented in the- LLLLformat specified by the incoming- formatvariable. 
Example 2
In this IAP example:
- The - Timezoneproperty is is set to UTC- -04:00(North American Eastern Time).
- The - offsetDurationwill add 86400000 milliseconds (1 day) to the- Timezonevalue that is retrieved.
- The - formatvariable is set to- MMM-DD-YYYY, which is the format for Month-Day-Full Year.
- For this example, the new - timevalue produced upon output will be presented in the- MMM-DD-YYYYformat specified by the incoming- formatvariable. 
Example 3
In this IAP example:
- The - Timezonevariable is set to UTC- -04:00(North American Eastern Time).
- The - offsetDurationwill add- 4 hoursto the- Timezonevalue that is retrieved.
- The - formatvariable is set to- hh:mm:ss, which is the format for Hours:Minutes:Seconds.
- For this example, the new - timevalue produced upon output will be presented in the- hh:mm:ssformat specified by the incoming- formatvariable.